<?php
declare (strict_types=1);

namespace app\api\model\v1;

use think\Model;

/**
 * @mixin \think\Model
 * 微信菜单
 */
class WxMenu extends AppModel
{
    //

    const IS_MENU_TYPE_ZERO = 0;
    const IS_MENU_TYPE_ONE = 1;
    const IS_MENU_TYPE_TWO = 2;

    public static $menu_type_arr = array(
        self::IS_MENU_TYPE_ZERO => '我的应用',
        self::IS_MENU_TYPE_ONE => '日常应用',
        self::IS_MENU_TYPE_TWO => '统计报表'
    );

    const IS_HOME_ONE = 1;
    const IS_HOME_TWO = 2;

    //是否在首页显示
    public static $is_home_arr = array(
        self::IS_HOME_ONE => '显示',
        self::IS_HOME_TWO => '隐藏'
    );

    const IS_STATUS_ONE = 1;
    const IS_STATUS_TWO = 2;

    //是否在首页显示
    public static $is_status_arr = array(
        self::IS_STATUS_ONE => '显示',
        self::IS_STATUS_TWO => '隐藏'
    );


    public function wxMenuAuth(){
        return $this->hasMany(AuthWxMenu::class,'wx_menu_id');
    }
}
